package com.dao.admin;

import com.pojo.Admin;
import com.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import sun.awt.image.IntegerInterleavedRaster;

import javax.xml.crypto.Data;
import java.util.List;
import java.util.Map;

@Mapper
public interface AdminMapper {
    //验证用户登录：用户和密码
    public Admin getLoginAdmin(@Param("name") String name, @Param("password") String password);

    //根据用户名查找用户进行登录判断
    public Admin findAdminByLoginName(@Param("name") String name);


    public List<Admin> getadminList();

    public List<Admin> getAdd(@Param("name") String name, @Param("description") String description);

    public int deleteById(int adminid);

    public int addByID(@Param("name") String name);


    public int getallcount();

    public Admin selectAdminById(int adminid);

    public int updateAdmin(@Param("adminid") int adminid,
                           @Param("name") String name,
                           @Param("password") String password,
                           @Param("age") int age,
                           @Param("sex") String sex,
                           @Param("phone") String phone,
                           @Param("rolename") String rolename);

    public int addadmin(@Param("name") String name,
                          @Param("password") String password,
                          @Param("age") int age,
                          @Param("sex") String sex,
                          @Param("phone") String phone,
                          @Param("rolename") String rolename);

    public List<Admin> getsearch(String name);

}
